using System;
using System.Text;

namespace BTEditor
{
    public abstract class Decorator : EditorNode
    {
        public override EditorNodeEnum NodeEnum
        {
            get { return EditorNodeEnum.Decorator; }
        }

        public override int CanAddNodeCount
        {
            get { return EditorNodeConst.Normal_Decorator_CanAddNode; }
        }

        public virtual int ShowArgsMask
        {
            get { return (int)ArgsCountType.None; }
        }

        public override string ToChild()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append($" new {BTUtils.GetTypeName(GetNodeType())}");
            sb.Append($"( \n");
            DealField(sb);
            sb.Append($" {BelongNode.DefaultNode?.ToChild()}");
            sb.Append($")");
            return sb.ToString();
        }              
    }
}